#pragma once
#include "Header.h"
#include <map>

struct INLINEHOOK
{
    ULONG_PTR lpSrcFunc;
    BYTE OldCode[INLINE_HOOK_BYTES];
    BYTE NewCode[INLINE_HOOK_BYTES];

    INLINEHOOK(IN ULONG_PTR SrcFunc)
    {
        lpSrcFunc = SrcFunc;
    }
};
using PINLINEHOOK = INLINEHOOK*;

class CInlineHook
{
private:
    std::map<ULONG_PTR, PINLINEHOOK> m_InlineHookMap;

public:
    CInlineHook();
    ~CInlineHook();

public:
    BOOL InlineHook(IN ULONG_PTR SrcFunc, IN ULONG_PTR NewFunc);
    BOOL Remove(IN ULONG_PTR SrcFunc);
    void RemoveAll();
};

extern CInlineHook g_inlinehook;
